import dva from 'dva';
// import createHistory from 'history/createBrowserHistory';  //报错, 说找不到这个包
// import {browserHistory} from 'dva/router'; //无效,仍然是hash路由
import { createBrowserHistory as createHistory } from 'history';  //有效
import './index.css';

// 1. Initialize
//默认哈希路由#开头
// const app = dva();

//使用browserRouter, 斜杠开头的路由
const app = dva({
  history: createHistory()
});

// 2. Plugins
// app.use({});

// 3. Model
// app.model(require('./models/example').default);
app.model(require('./models/indexTest').default);

// 4. Router
app.router(require('./router').default);

// 5. Start
app.start('#root');
